<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: Sifteo::VideoBuffer Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>Sifteo</b></li><li class="navelem"><a class="el" href="struct_sifteo_1_1_video_buffer.html">VideoBuffer</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="struct_sifteo_1_1_video_buffer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Sifteo::VideoBuffer Struct Reference<div class="ingroups"><a class="el" href="group__video.html">Video</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>A memory buffer which holds graphics data.  
 <a href="struct_sifteo_1_1_video_buffer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="video_8h_source.html">sifteo/video.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0692f60195f9dede57413e993bfabce7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a0692f60195f9dede57413e993bfabce7">attach</a> (_SYSCubeID id)</td></tr>
<tr class="memdesc:a0692f60195f9dede57413e993bfabce7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> to a cube.  <a href="#a0692f60195f9dede57413e993bfabce7">More...</a><br/></td></tr>
<tr class="separator:a0692f60195f9dede57413e993bfabce7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77de0feaf960c89abe469a351c0c130f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a77de0feaf960c89abe469a351c0c130f"></a>
<a class="el" href="struct_sifteo_1_1_cube_i_d.html">CubeID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a77de0feaf960c89abe469a351c0c130f">cube</a> () const </td></tr>
<tr class="memdesc:a77de0feaf960c89abe469a351c0c130f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the <a class="el" href="struct_sifteo_1_1_cube_i_d.html" title="A lightweight identifier for one Sifteo cube.">CubeID</a> that this buffer is currently attached to. <br/></td></tr>
<tr class="separator:a77de0feaf960c89abe469a351c0c130f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d104afc7ecfd651cbde68d8acb24320"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a5d104afc7ecfd651cbde68d8acb24320">erase</a> ()</td></tr>
<tr class="memdesc:a5d104afc7ecfd651cbde68d8acb24320"><td class="mdescLeft">&#160;</td><td class="mdescRight">Zero all mode-specific video memory.  <a href="#a5d104afc7ecfd651cbde68d8acb24320">More...</a><br/></td></tr>
<tr class="separator:a5d104afc7ecfd651cbde68d8acb24320"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae61998e02aa120b503bd827490d58dfd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#ae61998e02aa120b503bd827490d58dfd">initMode</a> (<a class="el" href="group__video.html#ga2e2ba8d4e602cffb8a6e9fc283b18b2f">VideoMode</a> m, unsigned firstLine=0, unsigned numLines=LCD_height)</td></tr>
<tr class="memdesc:ae61998e02aa120b503bd827490d58dfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the video buffer and change modes.  <a href="#ae61998e02aa120b503bd827490d58dfd">More...</a><br/></td></tr>
<tr class="separator:ae61998e02aa120b503bd827490d58dfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9c728fc74191f881c5cd3779487de13"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#ae9c728fc74191f881c5cd3779487de13">lock</a> (uint16_t addr)</td></tr>
<tr class="memdesc:ae9c728fc74191f881c5cd3779487de13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prepare to modify a particular address.  <a href="#ae9c728fc74191f881c5cd3779487de13">More...</a><br/></td></tr>
<tr class="separator:ae9c728fc74191f881c5cd3779487de13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55592ef6b768dae50b4dbc8a64994ac5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a55592ef6b768dae50b4dbc8a64994ac5"></a>
<a class="el" href="group__video.html#ga2e2ba8d4e602cffb8a6e9fc283b18b2f">VideoMode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a55592ef6b768dae50b4dbc8a64994ac5">mode</a> () const </td></tr>
<tr class="memdesc:a55592ef6b768dae50b4dbc8a64994ac5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the last video mode set by <a class="el" href="struct_sifteo_1_1_video_buffer.html#a41d12aea8d7bf621e92efcfe4a622c0f" title="Change the video mode.">setMode()</a> <br/></td></tr>
<tr class="separator:a55592ef6b768dae50b4dbc8a64994ac5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac43dc3124249835371fc0e003c64258"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#aac43dc3124249835371fc0e003c64258">operator _SYSCubeID</a> () const </td></tr>
<tr class="memdesc:aac43dc3124249835371fc0e003c64258"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implicit conversion to _SYSCubeID.  <a href="#aac43dc3124249835371fc0e003c64258">More...</a><br/></td></tr>
<tr class="separator:aac43dc3124249835371fc0e003c64258"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaff2df000e80effede43f717f8cc06b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaaff2df000e80effede43f717f8cc06b"></a>
<a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#aaaff2df000e80effede43f717f8cc06b">orientation</a> () const </td></tr>
<tr class="memdesc:aaaff2df000e80effede43f717f8cc06b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Map the LCD rotation mask to screen orientation. This is the side which maps to the physical "top" of the screen. <br/></td></tr>
<tr class="separator:aaaff2df000e80effede43f717f8cc06b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae775489a1fbc1ba9bf8a20385f56aacb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#ae775489a1fbc1ba9bf8a20385f56aacb">orientTo</a> (const <a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> &amp;thisN, const <a class="el" href="struct_sifteo_1_1_video_buffer.html">VideoBuffer</a> &amp;src, const <a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> &amp;srcN)</td></tr>
<tr class="memdesc:ae775489a1fbc1ba9bf8a20385f56aacb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a>'s cube orientation to be consistent with the orientation of another "source" <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> whose cube is neighbored to this one.  <a href="#ae775489a1fbc1ba9bf8a20385f56aacb">More...</a><br/></td></tr>
<tr class="separator:ae775489a1fbc1ba9bf8a20385f56aacb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59ea1235ca2be45cc4a37a0cefc7b39d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a59ea1235ca2be45cc4a37a0cefc7b39d">orientTo</a> (const <a class="el" href="struct_sifteo_1_1_video_buffer.html">VideoBuffer</a> &amp;src)</td></tr>
<tr class="memdesc:a59ea1235ca2be45cc4a37a0cefc7b39d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Variant of <a class="el" href="struct_sifteo_1_1_video_buffer.html#ae775489a1fbc1ba9bf8a20385f56aacb" title="Set this VideoBuffer&#39;s cube orientation to be consistent with the orientation of another &quot;source&quot; Vid...">orientTo()</a> without explicitly specified Neighborhoods.  <a href="#a59ea1235ca2be45cc4a37a0cefc7b39d">More...</a><br/></td></tr>
<tr class="separator:a59ea1235ca2be45cc4a37a0cefc7b39d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1951c99493672feefd158034b9b83b29"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1951c99493672feefd158034b9b83b29"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a1951c99493672feefd158034b9b83b29">peek</a> (uint16_t addr) const </td></tr>
<tr class="memdesc:a1951c99493672feefd158034b9b83b29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read one word of VRAM. <br/></td></tr>
<tr class="separator:a1951c99493672feefd158034b9b83b29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97bdd2f4e61c319f7ddb1479032e36ec"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a97bdd2f4e61c319f7ddb1479032e36ec"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a97bdd2f4e61c319f7ddb1479032e36ec">peekb</a> (uint16_t addr) const </td></tr>
<tr class="memdesc:a97bdd2f4e61c319f7ddb1479032e36ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read one byte of VRAM. <br/></td></tr>
<tr class="separator:a97bdd2f4e61c319f7ddb1479032e36ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0af3dc18ca2863f34d33082c3e2ed2a6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__math.html#gaec7afb90b5c1db8751abaf5f0406f6b7">Byte3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a0af3dc18ca2863f34d33082c3e2ed2a6">physicalAccel</a> () const </td></tr>
<tr class="memdesc:a0af3dc18ca2863f34d33082c3e2ed2a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the physical accelerometer reading for this cube.  <a href="#a0af3dc18ca2863f34d33082c3e2ed2a6">More...</a><br/></td></tr>
<tr class="separator:a0af3dc18ca2863f34d33082c3e2ed2a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0dcb38ca0a929576d854ec562f26fa3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#ad0dcb38ca0a929576d854ec562f26fa3">physicalNeighbors</a> () const </td></tr>
<tr class="memdesc:ad0dcb38ca0a929576d854ec562f26fa3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the current physical neighbors for the cube attached to this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a>.  <a href="#ad0dcb38ca0a929576d854ec562f26fa3">More...</a><br/></td></tr>
<tr class="separator:ad0dcb38ca0a929576d854ec562f26fa3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ca3896743662fca64aeb9376771d43a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4ca3896743662fca64aeb9376771d43a"></a>
<a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a4ca3896743662fca64aeb9376771d43a">physicalToVirtual</a> (<a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a> side) const </td></tr>
<tr class="memdesc:a4ca3896743662fca64aeb9376771d43a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a physical side (relative to the hardware itself) to a virtual side (relative to the current screen orientation). <br/></td></tr>
<tr class="separator:a4ca3896743662fca64aeb9376771d43a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bcb8d641638bc988fbba40655b7f7c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a4bcb8d641638bc988fbba40655b7f7c0">physicalToVirtual</a> (<a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> nb) const </td></tr>
<tr class="memdesc:a4bcb8d641638bc988fbba40655b7f7c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> from physical to virtual orientation.  <a href="#a4bcb8d641638bc988fbba40655b7f7c0">More...</a><br/></td></tr>
<tr class="separator:a4bcb8d641638bc988fbba40655b7f7c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4419fb1a7322a4a771ab9a3f2a1d5ca1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a4419fb1a7322a4a771ab9a3f2a1d5ca1">poke</a> (uint16_t addr, uint16_t word)</td></tr>
<tr class="memdesc:a4419fb1a7322a4a771ab9a3f2a1d5ca1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modify a word of VRAM, automatically locking it and marking the change only if that word has actually been modified.  <a href="#a4419fb1a7322a4a771ab9a3f2a1d5ca1">More...</a><br/></td></tr>
<tr class="separator:a4419fb1a7322a4a771ab9a3f2a1d5ca1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21e9698e8258a3dbbe924c4b86853ad3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21e9698e8258a3dbbe924c4b86853ad3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a21e9698e8258a3dbbe924c4b86853ad3">pokeb</a> (uint16_t addr, uint8_t byte)</td></tr>
<tr class="memdesc:a21e9698e8258a3dbbe924c4b86853ad3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Like <a class="el" href="struct_sifteo_1_1_video_buffer.html#a4419fb1a7322a4a771ab9a3f2a1d5ca1" title="Modify a word of VRAM, automatically locking it and marking the change only if that word has actually...">poke()</a>, but modifies a single byte. Less efficient, but sometimes you really do just want to modify one byte. <br/></td></tr>
<tr class="separator:a21e9698e8258a3dbbe924c4b86853ad3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a253102bfa4c6b19a043e2698cfeb3049"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a253102bfa4c6b19a043e2698cfeb3049"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a253102bfa4c6b19a043e2698cfeb3049">pokei</a> (uint16_t addr, uint16_t index)</td></tr>
<tr class="memdesc:a253102bfa4c6b19a043e2698cfeb3049"><td class="mdescLeft">&#160;</td><td class="mdescRight">Poke a 14-bit tile index into a particular VRAM word. <br/></td></tr>
<tr class="separator:a253102bfa4c6b19a043e2698cfeb3049"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af16b712a97a7e5ae8f8f308230e5cfbe"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af16b712a97a7e5ae8f8f308230e5cfbe"></a>
<a class="el" href="group__video.html#gaa8d0a28cd88f048fe9e21f8f3cc4abf7">Rotation</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#af16b712a97a7e5ae8f8f308230e5cfbe">rotation</a> () const </td></tr>
<tr class="memdesc:af16b712a97a7e5ae8f8f308230e5cfbe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up the last display rotation set by <a class="el" href="struct_sifteo_1_1_video_buffer.html#a6b37adf80404991354f3b7a1be669000" title="Set the display rotation to use in subsequent rendering.">setRotation()</a>. <br/></td></tr>
<tr class="separator:af16b712a97a7e5ae8f8f308230e5cfbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae16a958e066590c8e1ae523982046f1b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae16a958e066590c8e1ae523982046f1b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#ae16a958e066590c8e1ae523982046f1b">setDefaultWindow</a> ()</td></tr>
<tr class="memdesc:ae16a958e066590c8e1ae523982046f1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restore the default full-screen drawing window. <br/></td></tr>
<tr class="separator:ae16a958e066590c8e1ae523982046f1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41d12aea8d7bf621e92efcfe4a622c0f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a41d12aea8d7bf621e92efcfe4a622c0f">setMode</a> (<a class="el" href="group__video.html#ga2e2ba8d4e602cffb8a6e9fc283b18b2f">VideoMode</a> m)</td></tr>
<tr class="memdesc:a41d12aea8d7bf621e92efcfe4a622c0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the video mode.  <a href="#a41d12aea8d7bf621e92efcfe4a622c0f">More...</a><br/></td></tr>
<tr class="separator:a41d12aea8d7bf621e92efcfe4a622c0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ba976d3850fc1c7b60c32d0d9a63920"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a5ba976d3850fc1c7b60c32d0d9a63920">setOrientation</a> (<a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a> topSide)</td></tr>
<tr class="memdesc:a5ba976d3850fc1c7b60c32d0d9a63920"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the LCD rotation such that the top of the framebuffer is at the physical side 'topSide'.  <a href="#a5ba976d3850fc1c7b60c32d0d9a63920">More...</a><br/></td></tr>
<tr class="separator:a5ba976d3850fc1c7b60c32d0d9a63920"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b37adf80404991354f3b7a1be669000"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6b37adf80404991354f3b7a1be669000"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a6b37adf80404991354f3b7a1be669000">setRotation</a> (<a class="el" href="group__video.html#gaa8d0a28cd88f048fe9e21f8f3cc4abf7">Rotation</a> r)</td></tr>
<tr class="memdesc:a6b37adf80404991354f3b7a1be669000"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the display rotation to use in subsequent rendering. <br/></td></tr>
<tr class="separator:a6b37adf80404991354f3b7a1be669000"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c89222691487b3fc7940d85012cb01f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a0c89222691487b3fc7940d85012cb01f">setWindow</a> (uint8_t firstLine, uint8_t numLines)</td></tr>
<tr class="memdesc:a0c89222691487b3fc7940d85012cb01f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the current drawing window.  <a href="#a0c89222691487b3fc7940d85012cb01f">More...</a><br/></td></tr>
<tr class="separator:a0c89222691487b3fc7940d85012cb01f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72e31ae868682505238a98ef86fc6849"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a72e31ae868682505238a98ef86fc6849"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a72e31ae868682505238a98ef86fc6849">setWindowFirstLine</a> (uint8_t firstLine)</td></tr>
<tr class="memdesc:a72e31ae868682505238a98ef86fc6849"><td class="mdescLeft">&#160;</td><td class="mdescRight">Like <a class="el" href="struct_sifteo_1_1_video_buffer.html#a0c89222691487b3fc7940d85012cb01f" title="Change the current drawing window.">setWindow()</a>, but change only the first line. <br/></td></tr>
<tr class="separator:a72e31ae868682505238a98ef86fc6849"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6763d365d7fbf71040adb9e77479fe93"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6763d365d7fbf71040adb9e77479fe93"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a6763d365d7fbf71040adb9e77479fe93">setWindowNumLines</a> (uint8_t numLines)</td></tr>
<tr class="memdesc:a6763d365d7fbf71040adb9e77479fe93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Like <a class="el" href="struct_sifteo_1_1_video_buffer.html#a0c89222691487b3fc7940d85012cb01f" title="Change the current drawing window.">setWindow()</a>, but change only the number of lines. <br/></td></tr>
<tr class="separator:a6763d365d7fbf71040adb9e77479fe93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7be46f97b775c5e765302f3ac02c7b40"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a7be46f97b775c5e765302f3ac02c7b40">touch</a> ()</td></tr>
<tr class="memdesc:a7be46f97b775c5e765302f3ac02c7b40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark the <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> as having changed, without actually modifying any memory.  <a href="#a7be46f97b775c5e765302f3ac02c7b40">More...</a><br/></td></tr>
<tr class="separator:a7be46f97b775c5e765302f3ac02c7b40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b6ffc064efbf5e7f9c55bb60698c2df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a5b6ffc064efbf5e7f9c55bb60698c2df">unlock</a> ()</td></tr>
<tr class="memdesc:a5b6ffc064efbf5e7f9c55bb60698c2df"><td class="mdescLeft">&#160;</td><td class="mdescRight">End a sequence of modifications to VRAM.  <a href="#a5b6ffc064efbf5e7f9c55bb60698c2df">More...</a><br/></td></tr>
<tr class="separator:a5b6ffc064efbf5e7f9c55bb60698c2df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa27f05696d41db66b4e6bf850f65b083"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__math.html#gaec7afb90b5c1db8751abaf5f0406f6b7">Byte3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#aa27f05696d41db66b4e6bf850f65b083">virtualAccel</a> () const </td></tr>
<tr class="memdesc:aa27f05696d41db66b4e6bf850f65b083"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the virtual accelerometer reading for this cube.  <a href="#aa27f05696d41db66b4e6bf850f65b083">More...</a><br/></td></tr>
<tr class="separator:aa27f05696d41db66b4e6bf850f65b083"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94d3f67acdd18d10f0ead04b65bac66a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a94d3f67acdd18d10f0ead04b65bac66a">virtualNeighbors</a> () const </td></tr>
<tr class="memdesc:a94d3f67acdd18d10f0ead04b65bac66a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the current virtual neighbors for the cube attached to this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a>.  <a href="#a94d3f67acdd18d10f0ead04b65bac66a">More...</a><br/></td></tr>
<tr class="separator:a94d3f67acdd18d10f0ead04b65bac66a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebb635bde4a92c51060e46b9dc6f9f2d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aebb635bde4a92c51060e46b9dc6f9f2d"></a>
<a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#aebb635bde4a92c51060e46b9dc6f9f2d">virtualToPhysical</a> (<a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a> side) const </td></tr>
<tr class="memdesc:aebb635bde4a92c51060e46b9dc6f9f2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a virtual side (relative to the current screen orientation) to a physical side (relative to the hardware itself). <br/></td></tr>
<tr class="separator:aebb635bde4a92c51060e46b9dc6f9f2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfa3309a1d47df7dfc6070bd73e84141"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#abfa3309a1d47df7dfc6070bd73e84141">virtualToPhysical</a> (<a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> nb) const </td></tr>
<tr class="memdesc:abfa3309a1d47df7dfc6070bd73e84141"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> from virtual to physical orientation.  <a href="#abfa3309a1d47df7dfc6070bd73e84141">More...</a><br/></td></tr>
<tr class="separator:abfa3309a1d47df7dfc6070bd73e84141"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f81210128f8f6e21460a0d7c0582681"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7f81210128f8f6e21460a0d7c0582681"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a7f81210128f8f6e21460a0d7c0582681">windowFirstLine</a> () const </td></tr>
<tr class="memdesc:a7f81210128f8f6e21460a0d7c0582681"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the most recent 'firstLine' value, set with <a class="el" href="struct_sifteo_1_1_video_buffer.html#a0c89222691487b3fc7940d85012cb01f" title="Change the current drawing window.">setWindow()</a> or <a class="el" href="struct_sifteo_1_1_video_buffer.html#a72e31ae868682505238a98ef86fc6849" title="Like setWindow(), but change only the first line.">setWindowFirstLine()</a> <br/></td></tr>
<tr class="separator:a7f81210128f8f6e21460a0d7c0582681"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67c8f736b7cab1d4699a5fda16f02c48"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67c8f736b7cab1d4699a5fda16f02c48"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a67c8f736b7cab1d4699a5fda16f02c48">windowNumLines</a> () const </td></tr>
<tr class="memdesc:a67c8f736b7cab1d4699a5fda16f02c48"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the most recent 'numLines' value, set with <a class="el" href="struct_sifteo_1_1_video_buffer.html#a0c89222691487b3fc7940d85012cb01f" title="Change the current drawing window.">setWindow()</a> or <a class="el" href="struct_sifteo_1_1_video_buffer.html#a6763d365d7fbf71040adb9e77479fe93" title="Like setWindow(), but change only the number of lines.">setWindowNumLines()</a> <br/></td></tr>
<tr class="separator:a67c8f736b7cab1d4699a5fda16f02c48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3c23e1d8eefdde108d281ec19aebfe3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3c23e1d8eefdde108d281ec19aebfe3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#ab3c23e1d8eefdde108d281ec19aebfe3">xorb</a> (uint16_t addr, uint8_t byte)</td></tr>
<tr class="memdesc:ab3c23e1d8eefdde108d281ec19aebfe3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Like <a class="el" href="struct_sifteo_1_1_video_buffer.html#a21e9698e8258a3dbbe924c4b86853ad3" title="Like poke(), but modifies a single byte. Less efficient, but sometimes you really do just want to mod...">pokeb()</a>, but atomically XORs a value with the byte. This is a no-op if and only if byte==0. <br/></td></tr>
<tr class="separator:ab3c23e1d8eefdde108d281ec19aebfe3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a53861e8b4a906c1d53864124e63a9f88"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a53861e8b4a906c1d53864124e63a9f88"></a>
static <a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a53861e8b4a906c1d53864124e63a9f88">physicalToVirtual</a> (<a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a> side, <a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a> rot)</td></tr>
<tr class="memdesc:a53861e8b4a906c1d53864124e63a9f88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a physical side (relative to the hardware itself) to a virtual side (relative to the specified screen orientation). <br/></td></tr>
<tr class="separator:a53861e8b4a906c1d53864124e63a9f88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a8a8d63b0b2576deac125d36183789c"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#a6a8a8d63b0b2576deac125d36183789c">physicalToVirtual</a> (<a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> nb, <a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a> rot)</td></tr>
<tr class="memdesc:a6a8a8d63b0b2576deac125d36183789c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> from physical to virtual orientation.  <a href="#a6a8a8d63b0b2576deac125d36183789c">More...</a><br/></td></tr>
<tr class="separator:a6a8a8d63b0b2576deac125d36183789c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef08f2ddd0ae70730333248934c7ccfa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef08f2ddd0ae70730333248934c7ccfa"></a>
static <a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#aef08f2ddd0ae70730333248934c7ccfa">virtualToPhysical</a> (<a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a> side, <a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a> rot)</td></tr>
<tr class="memdesc:aef08f2ddd0ae70730333248934c7ccfa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a virtual side (relative to the specified screen orientation) to a physical side (relative to the hardware itself). <br/></td></tr>
<tr class="separator:aef08f2ddd0ae70730333248934c7ccfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5ddfc1c9b5e17ab0411a68c50473949"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_video_buffer.html#ab5ddfc1c9b5e17ab0411a68c50473949">virtualToPhysical</a> (<a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> nb, <a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a> rot)</td></tr>
<tr class="memdesc:ab5ddfc1c9b5e17ab0411a68c50473949"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> from virtual to physical orientation.  <a href="#ab5ddfc1c9b5e17ab0411a68c50473949">More...</a><br/></td></tr>
<tr class="separator:ab5ddfc1c9b5e17ab0411a68c50473949"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A memory buffer which holds graphics data. </p>
<p>This is a mirror of the remote graphics memory in each cube's hardware. By writing to this buffer, changes are enqueued for later transmission to the physical video buffer.</p>
<p>Cubes have a few basic video features that are always available: rotation, windowing, and selecting a video mode. This class provides access to those features, as well as low-level primitives for accessing the underlying video buffer memory.</p>
<p>The layout and meaning of video memory changes depending on what mode you're in. This class provides a union of mode-specific accessors you can use.</p>
<p>VideoBuffers can be used with at most one <a class="el" href="struct_sifteo_1_1_cube_i_d.html" title="A lightweight identifier for one Sifteo cube.">CubeID</a> at a time, though this association between cubes and video buffers can change at runtime. Most games will want to have one <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> per cube, but if you plan to support very large numbers of cubes, it may be necessary to have fewer VideoBuffers that are shared among a larger number of cubes.</p>
<p>VideoBuffers must be explicitly attached to a cube. See <a class="el" href="struct_sifteo_1_1_video_buffer.html#a0692f60195f9dede57413e993bfabce7" title="Attach this VideoBuffer to a cube.">VideoBuffer::attach()</a> and <a class="el" href="struct_sifteo_1_1_cube_i_d.html#a69ef118d050558bb080467b95f0fc865" title="Detach any video buffer which was previously attached to this cube.">CubeID::detachVideoBuffer()</a>.</p>
<p>If you're accessing the low-level <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> memory directly, it is strongly recommended that you're aware of the synchronization protocol used in this buffer, to keep it consistent between the system software and your application. See <a class="el" href="abi_8h_source.html">abi.h</a> for details on this protocol. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a0692f60195f9dede57413e993bfabce7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::attach </td>
          <td>(</td>
          <td class="paramtype">_SYSCubeID&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Attach this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> to a cube. </p>
<p>When this cube is enabled and connected, the system will asynchronously stream video data from this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> to that cube.</p>
<p>This call automatically reinitializes the change bitmap in this buffer, so that we'll resend its contents to the cube on next paint.</p>
<p>If this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> was previously attached to a different cube, you must manually <a class="el" href="struct_sifteo_1_1_video_buffer.html#a0692f60195f9dede57413e993bfabce7" title="Attach this VideoBuffer to a cube.">attach()</a> a different video buffer to the old cube first, or call <a class="el" href="struct_sifteo_1_1_cube_i_d.html#a69ef118d050558bb080467b95f0fc865" title="Detach any video buffer which was previously attached to this cube.">CubeID::detachVideoBuffer()</a> on the old cube. A <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> must never be attached to multiple cubes at once.</p>
<p>In general, a <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> should be <a class="el" href="struct_sifteo_1_1_video_buffer.html#a0692f60195f9dede57413e993bfabce7" title="Attach this VideoBuffer to a cube.">attach()</a>'ed prior to performing any tile rendering. This is because the relocated tile addresses of your assets may be different for each cube, so we need to know the attached cube's ID at draw time.</p>
<p>Waits for all cubes to finish rendering before (re)attaching this buffer. </p>

</div>
</div>
<a class="anchor" id="a5d104afc7ecfd651cbde68d8acb24320"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::erase </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Zero all mode-specific video memory. </p>
<p>This is typically part of <a class="el" href="struct_sifteo_1_1_video_buffer.html#ae61998e02aa120b503bd827490d58dfd" title="Initialize the video buffer and change modes.">initMode()</a>, but it may be necessary to do this at other times. For example, when doing a multi-mode scene, you may need to ensure that unused portions of VRAM are in a known blank state. </p>

</div>
</div>
<a class="anchor" id="ae61998e02aa120b503bd827490d58dfd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::initMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__video.html#ga2e2ba8d4e602cffb8a6e9fc283b18b2f">VideoMode</a>&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>firstLine</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>numLines</em> = <code>LCD_height</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initialize the video buffer and change modes. </p>
<p>This is a shorthand for calling <a class="el" href="class_sifteo_1_1_system.html#a36d92c44328916f60f62abf63d2ee7bd" title="Wait for any previous paint() to finish.">System::finish()</a> to finish existing rendering before changing the mode, actually changing the mode, restoring the default window and rotation, and finally zero'ing all mode-specific video memory.</p>
<p>Most programs should use <a class="el" href="struct_sifteo_1_1_video_buffer.html#ae61998e02aa120b503bd827490d58dfd" title="Initialize the video buffer and change modes.">initMode()</a> to set up the initial mode for a <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a>, prior to attaching it to a cube. This is because the process of attaching a video buffer causes the system to assume all video memory is 'dirty', and re-send it to the cube. It is important to have video memory in the state you want it to be in before this happens.</p>
<p>You can optionally specify a non-default window size. This is helpful, since often when doing multi-mode rendering you need to change modes and change windows at the same time. </p>

</div>
</div>
<a class="anchor" id="ae9c728fc74191f881c5cd3779487de13"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::lock </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Prepare to modify a particular address. </p>
<p>Addresses must be locked prior to the buffer memory being modified. Multiple calls to lock may be made in a row, without an intervening <a class="el" href="struct_sifteo_1_1_video_buffer.html#a5b6ffc064efbf5e7f9c55bb60698c2df" title="End a sequence of modifications to VRAM.">unlock()</a>.</p>
<p>Typically this operation is performed automatically as part of any other write operation, like a <a class="el" href="struct_sifteo_1_1_video_buffer.html#a4419fb1a7322a4a771ab9a3f2a1d5ca1" title="Modify a word of VRAM, automatically locking it and marking the change only if that word has actually...">poke()</a>. </p>

</div>
</div>
<a class="anchor" id="aac43dc3124249835371fc0e003c64258"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Sifteo::VideoBuffer::operator _SYSCubeID </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implicit conversion to _SYSCubeID. </p>
<p>This lets you pass a <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> to the <a class="el" href="struct_sifteo_1_1_cube_i_d.html" title="A lightweight identifier for one Sifteo cube.">CubeID</a> constructor, to easily get a <a class="el" href="struct_sifteo_1_1_cube_i_d.html" title="A lightweight identifier for one Sifteo cube.">CubeID</a> instance for the current cube that this buffer is attached to. </p>

</div>
</div>
<a class="anchor" id="ae775489a1fbc1ba9bf8a20385f56aacb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::orientTo </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> &amp;&#160;</td>
          <td class="paramname"><em>thisN</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="struct_sifteo_1_1_video_buffer.html">VideoBuffer</a> &amp;&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> &amp;&#160;</td>
          <td class="paramname"><em>srcN</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a>'s cube orientation to be consistent with the orientation of another "source" <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> whose cube is neighbored to this one. </p>
<p>This version requires the caller to supply <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> instances corresponding to both our own cube and the 'src' cube. This does not require that the cubes are currently neighbored, just that they were when the <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> objects were created.</p>
<p>Note that these Neighborhoods must be in physical orientation, not transformed to virtual. </p>

</div>
</div>
<a class="anchor" id="a59ea1235ca2be45cc4a37a0cefc7b39d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::orientTo </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_sifteo_1_1_video_buffer.html">VideoBuffer</a> &amp;&#160;</td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Variant of <a class="el" href="struct_sifteo_1_1_video_buffer.html#ae775489a1fbc1ba9bf8a20385f56aacb" title="Set this VideoBuffer&#39;s cube orientation to be consistent with the orientation of another &quot;source&quot; Vid...">orientTo()</a> without explicitly specified Neighborhoods. </p>
<p>Uses the current system neighbor state for each of the two cubes.</p>
<p>Note that the caller is responsible for ensuring that this cube and the source cube are actually neighbored. The set of neighbored cubes may change at any event dispatch point, such as <a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6" title="Draw the next frame.">System::paint()</a>. </p>

</div>
</div>
<a class="anchor" id="a0af3dc18ca2863f34d33082c3e2ed2a6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__math.html#gaec7afb90b5c1db8751abaf5f0406f6b7">Byte3</a> Sifteo::VideoBuffer::physicalAccel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the physical accelerometer reading for this cube. </p>
<p>The resulting vector is oriented with respect to the cube hardware.</p>
<p>This is equivalent to calling accel() on the <a class="el" href="struct_sifteo_1_1_video_buffer.html#a77de0feaf960c89abe469a351c0c130f" title="Get the CubeID that this buffer is currently attached to.">cube()</a> object. </p>

</div>
</div>
<a class="anchor" id="ad0dcb38ca0a929576d854ec562f26fa3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> Sifteo::VideoBuffer::physicalNeighbors </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the current physical neighbors for the cube attached to this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a>. </p>
<p>This is equivalent to creating a new <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> instance from <a class="el" href="struct_sifteo_1_1_video_buffer.html#a77de0feaf960c89abe469a351c0c130f" title="Get the CubeID that this buffer is currently attached to.">cube()</a>, but it's provided by analogy with <a class="el" href="struct_sifteo_1_1_video_buffer.html#a94d3f67acdd18d10f0ead04b65bac66a" title="Return the current virtual neighbors for the cube attached to this VideoBuffer.">virtualNeighbors()</a>. </p>

</div>
</div>
<a class="anchor" id="a6a8a8d63b0b2576deac125d36183789c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> Sifteo::VideoBuffer::physicalToVirtual </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a>&#160;</td>
          <td class="paramname"><em>nb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a>&#160;</td>
          <td class="paramname"><em>rot</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert a <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> from physical to virtual orientation. </p>
<p>These two expressions produce the same result: </p>
<pre class="fragment">vbuf.physicalToVirtual(N).neighborAt(S)
N.neighborAt(vbuf.physicalToVirtual(S))
</pre><p>This version uses the specified cube orientation. </p>

</div>
</div>
<a class="anchor" id="a4bcb8d641638bc988fbba40655b7f7c0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> Sifteo::VideoBuffer::physicalToVirtual </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a>&#160;</td>
          <td class="paramname"><em>nb</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert a <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> from physical to virtual orientation. </p>
<p>These two expressions produce the same result: </p>
<pre class="fragment">vbuf.physicalToVirtual(N).neighborAt(S)
N.neighborAt(vbuf.physicalToVirtual(S))
</pre><p>Uses the current orientation of this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a>. </p>

</div>
</div>
<a class="anchor" id="a4419fb1a7322a4a771ab9a3f2a1d5ca1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::poke </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>word</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Modify a word of VRAM, automatically locking it and marking the change only if that word has actually been modified. </p>
<p>After a sequence of <a class="el" href="struct_sifteo_1_1_video_buffer.html#a4419fb1a7322a4a771ab9a3f2a1d5ca1" title="Modify a word of VRAM, automatically locking it and marking the change only if that word has actually...">poke()</a> calls, the caller is responsible for issuing one <a class="el" href="struct_sifteo_1_1_video_buffer.html#a5b6ffc064efbf5e7f9c55bb60698c2df" title="End a sequence of modifications to VRAM.">unlock()</a>. This happens automatically at the next <a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6" title="Draw the next frame.">System::paint()</a>. </p>

</div>
</div>
<a class="anchor" id="a41d12aea8d7bf621e92efcfe4a622c0f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::setMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__video.html#ga2e2ba8d4e602cffb8a6e9fc283b18b2f">VideoMode</a>&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Change the video mode. </p>
<p>8 This affects subsequent rendering only. Note that this may change the way hardware interprets the contents of video memory, so it's important to synchronize any mode changes such that you know the hardware has finished rendering with the old mode before you start rendering with the new mode. </p>

</div>
</div>
<a class="anchor" id="a5ba976d3850fc1c7b60c32d0d9a63920"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::setOrientation </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a>&#160;</td>
          <td class="paramname"><em>topSide</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the LCD rotation such that the top of the framebuffer is at the physical side 'topSide'. </p>
<p>This is the counterpart to the <a class="el" href="struct_sifteo_1_1_video_buffer.html#aaaff2df000e80effede43f717f8cc06b" title="Map the LCD rotation mask to screen orientation. This is the side which maps to the physical &quot;top&quot; of...">orientation()</a> getter. </p>

</div>
</div>
<a class="anchor" id="a0c89222691487b3fc7940d85012cb01f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::setWindow </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>firstLine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>numLines</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Change the current drawing window. </p>
<p>The graphics processor generates one scanline at a time. Windowed drawing allows the graphics processor to emit fewer scanlines than a full screen, and to modify where on the LCD these scanlines begin. In this way, you can do partial-screen rendering in the Y axis.</p>
<p>This can be used for many kinds of animation effects as well as effects that involve mixing different video modes.</p>
<p>Windowing takes place prior to Rotation. So, if your screen is rotated 90 degrees left, for example, setWindow would be operating on screen columns rather than rows, and the "line" numbers would start at the left edge. </p>

</div>
</div>
<a class="anchor" id="a7be46f97b775c5e765302f3ac02c7b40"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::touch </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Mark the <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> as having changed, without actually modifying any memory. </p>
<p>This will force the next <a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6" title="Draw the next frame.">System::paint()</a> to actually redraw this cube, even if it seems like nothing has changed. </p>

</div>
</div>
<a class="anchor" id="a5b6ffc064efbf5e7f9c55bb60698c2df"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::VideoBuffer::unlock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>End a sequence of modifications to VRAM. </p>
<p>If the system is not already busy flushing updates to the cube, this allows it to begin. This operation is performed implicitly during a <a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6" title="Draw the next frame.">System::paint()</a>. </p>

</div>
</div>
<a class="anchor" id="aa27f05696d41db66b4e6bf850f65b083"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__math.html#gaec7afb90b5c1db8751abaf5f0406f6b7">Byte3</a> Sifteo::VideoBuffer::virtualAccel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the virtual accelerometer reading for this cube. </p>
<p>The resulting vector is oriented with respect to the current LCD rotation. </p>

</div>
</div>
<a class="anchor" id="a94d3f67acdd18d10f0ead04b65bac66a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> Sifteo::VideoBuffer::virtualNeighbors </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the current virtual neighbors for the cube attached to this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a>. </p>
<p>This is equivalent to creating a new <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> instance from <a class="el" href="struct_sifteo_1_1_video_buffer.html#a77de0feaf960c89abe469a351c0c130f" title="Get the CubeID that this buffer is currently attached to.">cube()</a>, and transforming it with <a class="el" href="struct_sifteo_1_1_video_buffer.html#a53861e8b4a906c1d53864124e63a9f88" title="Convert a physical side (relative to the hardware itself) to a virtual side (relative to the specifie...">physicalToVirtual()</a>. </p>

</div>
</div>
<a class="anchor" id="ab5ddfc1c9b5e17ab0411a68c50473949"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> Sifteo::VideoBuffer::virtualToPhysical </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a>&#160;</td>
          <td class="paramname"><em>nb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__cube.html#ga8dc17340f515227e9bb34532bfc2fef3">Side</a>&#160;</td>
          <td class="paramname"><em>rot</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert a <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> from virtual to physical orientation. </p>
<p>These two expressions produce the same result: </p>
<pre class="fragment">vbuf.virtualToPhysical(N).neighborAt(S)
N.neighborAt(vbuf.virtualToPhysical(S))
</pre><p>This version uses the specified cube orientation. </p>

</div>
</div>
<a class="anchor" id="abfa3309a1d47df7dfc6070bd73e84141"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a> Sifteo::VideoBuffer::virtualToPhysical </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_sifteo_1_1_neighborhood.html">Neighborhood</a>&#160;</td>
          <td class="paramname"><em>nb</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert a <a class="el" href="struct_sifteo_1_1_neighborhood.html" title="A Neighborhood is a description of all neighbors for a single cube, packed into a small value...">Neighborhood</a> from virtual to physical orientation. </p>
<p>These two expressions produce the same result: </p>
<pre class="fragment">vbuf.virtualToPhysical(N).neighborAt(S)
N.neighborAt(vbuf.virtualToPhysical(S))
</pre><p>Uses the current orientation of this <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a>. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="video_8h_source.html">video.h</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
